<?php
if (!defined('PLUGINFRAME'))exit('hacking attempt'); 
class index extends common{
    
    private $_cates=array();
    
    public function __construct(){
        parent::__construct();
        $this->assgin('title','臭美网空间排期表');
    }
    
    public function index(){//openid FAEAB4541899786105AE01FA34EF184F
        $s=isset($_GET['sdate'])?$_GET['sdate']:'';
        $e=isset($_GET['edate'])?$_GET['edate']:'';
        if ($s && $e){
            $con_mod=D('Content');
            $item_mod=D('Item');
            $con=$con_mod->select(array(
                'where'=>'item_id in (select id from '.$item_mod->table().' where sdate='.strtotime($s).' and edate='.strtotime($e).')',
            ));
        }else {
            $con_mod=D('Content');
            $con=$con_mod->select(array(
                'where'=>array('is_del'=>0)
            ));
        }
        $this->assgin('s', $s);
        $this->assgin('e', $e);
        $this->assgin('con', $con);
        $this->assgin('page', $con_mod->_phtml);
        $this->assgin('year', date('Y'));
        $this->assgin('curDate',date('Y').'年'.date('m').'月'.date('d').'日');
        $this->display();
    }   
    
    public function question(){
    }
    
    public function confirm(){
    }
    
    public function result(){
    }

    //not in productId limit分页不行
    public function append(){
        
    }
    
    public function addlike(){
    }
}